import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBHomePage/YBMapMiShuPage/YBMapMiShuSubPage/YBMapMiShuAnimationTextPage.dart';

import 'YBMapMiShuSubPage/YBMapMiShuSelectContentPage.dart';

class YBMapShangWuMiShuPage extends StatefulWidget {
  @override
  _YBMapShangWuMiShuPageState createState() => _YBMapShangWuMiShuPageState();
}

class _YBMapShangWuMiShuPageState extends State<YBMapShangWuMiShuPage> {
  AmapController _controller;

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Stack(
        children: [
          Container(
            child:AmapView(
              mapType: MapType.Standard,
              showZoomControl: true,
              zoomLevel: 17,
              maskDelay: Duration(milliseconds: 500),
              onMapCreated: (controller) async{
                  controller.showMyLocation(MyLocationOption(
                    strokeColor: YBColor.commonThemeColor,
                    strokeWidth: 2,
                    show: true,
                    myLocationType: MyLocationType.Locate,
                  ));

                 // _controller = controller;
              },
            ),
          ),
          Container(
            child: Padding(
              padding: EdgeInsets.only(left: 20,right: 20),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.end,
                children: [
                  Container(
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.spaceAround,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Container(
                          height: 40,
                          width: 120,
                          decoration:BoxDecoration(
                            borderRadius: BorderRadius.all(Radius.circular(20.0)),
                            color: YBColor.commonThemeColor,
                          ),
                          child: Center(
                            child: Text('杭州西湖',style: YBTextStyle.TextStyleFFFFFF14Sembold,),
                          ),
                        ),
                        Container(
                          child: Image.asset(YBImageStyle.getImagePath('lawyerImage_locationCenterImage')),
                        )
                      ],
                    ),
                  ),
                  Container(
                    height: 50,
                  ),
                  Container(
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.end,
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: [
                        Container(
                          alignment: Alignment.centerRight,
                          height: 40,
                          width: 40,
                          decoration: BoxDecoration(
                            color: YBColor.white,
                            borderRadius: BorderRadius.all(Radius.circular(8.0)),
                          ),
                          child: InkWell(
                            child: Center(
                              child: Image.asset(YBImageStyle.getImagePath('lawyerImage_wodeweizhi')),
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    height: 10,
                  ),
                  Container(
                    alignment: Alignment.bottomCenter,
                    child: YBMapMiShuAnimationTextPage(),
                  ),
                  Container(
                    height: 10,
                  ),
                  Container(
                    alignment: Alignment.bottomCenter,
                    height: 235,
                    child: YBMapMiShuSelectContentPage(),
                  ),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}

